package mybox.junit;

import java.io.IOException;

import mybox.engine.File4Qcad;
import mybox.engine.QVector;
import mybox.engine.Rectangle;
import mybox.engine.ReferenceIOutput;
import mybox.engine.Triangle;


import junit.framework.TestCase;


public class RectangleProcs extends TestCase {
	
public void test_Rectangle() throws SecurityException, IOException {
		
		File4Qcad file4qcad = new File4Qcad(ReferenceIOutput.testoutputFile());	
		
		QVector lowerLeft = new QVector (0,0);
		double laenge=50;
		double breite=30;
		Rectangle rectangle = new Rectangle(file4qcad, lowerLeft, laenge, breite);
		rectangle.draw();
		file4qcad.close();
	       
	}

public void test_RectangleAllgemein() throws SecurityException, IOException {
	
	File4Qcad file4qcad = new File4Qcad(ReferenceIOutput.testoutputFile());	
	
	QVector lowerLeft = new QVector (10,5);
	double laenge=80;
	double breite=20;
	double angle=java.lang.Math.PI/2;
	Rectangle rectangle = new Rectangle(file4qcad, lowerLeft, laenge, breite,angle);
	rectangle.draw();
	file4qcad.close();
       
}

public void test_Triangle() throws SecurityException, IOException {
	
	File4Qcad file4qcad = new File4Qcad(ReferenceIOutput.testoutputFile());	
	
	QVector ecke1 = new QVector(0,0);
	QVector ecke2 = new QVector(0,10);
	QVector ecke3 = new QVector(5,5);
	
	new Triangle(file4qcad,ecke1,ecke2,ecke3);
	file4qcad.close();
}

public void test_RectangleJamaica() throws SecurityException, IOException {
	
	File4Qcad file4qcad = new File4Qcad(ReferenceIOutput.testoutputFile());	
	
	QVector lowerLeft = new QVector (0,0);
	double laenge=50;
	double breite=30;
	Rectangle rectangle = new Rectangle(file4qcad, lowerLeft, laenge, breite);
	//rectangle.draw();
	rectangle.drawJamaica(6);
	file4qcad.close();
       
}

}
